package com.pengtu.entity.report;


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.pengtu.entity.IdEntity;
import com.pengtu.utils.MathsUtils;

/**
 * Standardtest.
 */
@Entity
@Table(name="S_Q_REPORT_STANDARDTEST"
    ,schema="DGJD"
)
public class Standardtest  extends IdEntity {


     /**
	 * serialVersionUID:TODO
	 *
	 * @since 1.0.0
	 */
	
	private static final long serialVersionUID = 1L;
     private String pid;
     private String sid;
     private String checkitem;
     private String checkway;
     private String countPlan;
     private Double countMonth;
     private Double countTotal;
     private Double passMonth;
     private Double passTotal;
     private Double scountMonth;
     private Double scountTotal;
     private Double spassMonth;
     private Double spassTotal;
     private String attachment;
     private String batch;
     private String reporter;
     private String rechecker;
     private String remark;
     private Date checkdate;

    public Standardtest() {
    }
    @Column(name="PID", length=48)
    public String getPid() {
        return this.pid;
    }
    
    public void setPid(String pid) {
        this.pid = pid;
    }
    
    @Column(name="SID", nullable=false, length=48)
    public String getSid() {
        return this.sid;
    }
    
    public void setSid(String sid) {
        this.sid = sid;
    }
    
    @Column(name="CHECKITEM", length=480)
    public String getCheckitem() {
        return this.checkitem;
    }
    
    public void setCheckitem(String checkitem) {
        this.checkitem = checkitem;
    }
    
    @Column(name="CHECKWAY", length=480)
    public String getCheckway() {
        return this.checkway;
    }
    
    public void setCheckway(String checkway) {
        this.checkway = checkway;
    }
    
    @Column(name="COUNT_PLAN", length=480)
    public String getCountPlan() {
        return this.countPlan;
    }
    
    public void setCountPlan(String countPlan) {
        this.countPlan = countPlan;
    }
    
    @Column(name="COUNT_MONTH", precision=18)
    public Double getCountMonth() {
        return this.countMonth;
    }
    
    public void setCountMonth(Double countMonth) {
        this.countMonth = countMonth;
    }
    
    @Column(name="COUNT_TOTAL", precision=18)
    public Double getCountTotal() {
        return this.countTotal;
    }
    
    public void setCountTotal(Double countTotal) {
        this.countTotal = countTotal;
    }
    
    @Column(name="PASS_MONTH", precision=18)
    public Double getPassMonth() {
        return this.passMonth;
    }
    
    public void setPassMonth(Double passMonth) {
        this.passMonth = passMonth;
    }
    
    @Column(name="PASS_TOTAL", precision=18)
    public Double getPassTotal() {
        return this.passTotal;
    }
    
    public void setPassTotal(Double passTotal) {
        this.passTotal = passTotal;
    }
    
    @Column(name="SCOUNT_MONTH", precision=18)
    public Double getScountMonth() {
        return this.scountMonth;
    }
    
    public void setScountMonth(Double scountMonth) {
        this.scountMonth = scountMonth;
    }
    
    @Column(name="SCOUNT_TOTAL", precision=18)
    public Double getScountTotal() {
        return this.scountTotal;
    }
    
    public void setScountTotal(Double scountTotal) {
        this.scountTotal = scountTotal;
    }
    
    @Column(name="SPASS_MONTH", precision=18)
    public Double getSpassMonth() {
        return this.spassMonth;
    }
    
    public void setSpassMonth(Double spassMonth) {
        this.spassMonth = spassMonth;
    }
    
    @Column(name="SPASS_TOTAL", precision=18)
    public Double getSpassTotal() {
        return this.spassTotal;
    }
    
    public void setSpassTotal(Double spassTotal) {
        this.spassTotal = spassTotal;
    }
    
    @Column(name="ATTACHMENT", length=480)
    public String getAttachment() {
        return this.attachment;
    }
    
    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }
    
    @Column(name="BATCH", length=200)
    public String getBatch() {
        return this.batch;
    }
    
    public void setBatch(String batch) {
        this.batch = batch;
    }
    
    @Column(name="REPORTER", length=480)
    public String getReporter() {
        return this.reporter;
    }
    
    public void setReporter(String reporter) {
        this.reporter = reporter;
    }
    
    @Column(name="RECHECKER", length=480)
    public String getRechecker() {
        return this.rechecker;
    }
    
    public void setRechecker(String rechecker) {
        this.rechecker = rechecker;
    }
    
    @Column(name="REMARK", length=400)
    public String getRemark() {
        return this.remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CHECKDATE", length=7)
    public Date getCheckdate() {
        return this.checkdate;
    }
    
    public void setCheckdate(Date checkdate) {
        this.checkdate = checkdate;
    }
    
    
    /**
     * 
     * getYield:
     * 适用:施工标准合格率,
     * @return 
     * @exception 
     * @since  1.0.0
     */
    @Transient
    public Double getConYield(){
    	return MathsUtils.div("3",this.getPassMonth(),this.getCountMonth());
    } 
    @Transient
    public Double getConYieldTotal(){
    	return MathsUtils.div("3",this.getPassTotal(),this.getCountTotal());
    } 
    /**
     * 
     * getYield:
     * 适用:监理试验复核率,
     * @return 
     * @exception 
     * @since  1.0.0
     */
    @Transient
    public Double getSuperReview(){
    	return MathsUtils.div("3",this.getSpassMonth(),this.getScountMonth());
    }
    
    @Transient
    public Double getSuperReviewTotal(){
    	return MathsUtils.div("3",this.getSpassTotal(),this.getScountTotal());
    } 
    
    
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


